<template>
  <!-- 头部部分 -->
  <header class="header">
    <h1>todos</h1>
    <input
      @keyup.enter="todaAdd"
      class="new-todo"
      placeholder="请输入任务名称"
      autofocus
    />
  </header>
</template>

<script>
export default {
  name: 'TodoHeader',
  components: {},
  props: {},
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    todaAdd(e) {
      this.$emit('todaAdd', e.target.value)
    },
  },
}
</script>

<style scoped></style>
